//
//  ZKCity.m
//  zkCityList
//
//  Created by 帮友贷 on 16/3/1.
//  Copyright © 2016年 帮友贷. All rights reserved.
//

#import "ZKCity.h"

@implementation ZKCity

- (instancetype)initWithDict:(NSDictionary *)dict
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dict];
    }
    return self;
}

+ (instancetype)cityWithDict:(NSDictionary *)dict
{
    return [[self alloc] initWithDict:dict];
}

+ (NSArray *)cityWithArray:(NSArray *)array
{
    NSMutableArray *arrayM = [NSMutableArray array];
    for (NSDictionary *dict in array) {
        [arrayM addObject:[self cityWithDict:dict]];
    }
    
    return arrayM;
}

- (NSString *)description
{
    return [NSString stringWithFormat:@"<%@: %p> {name: %@ , title: %@ , cityId: %@ , city_name: %@ , pinyin: %@}", self.class, self,self.short_name ,self.initials ,self.city_key, self.city_name, self.pinyin];
}

@end
